<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>mtlb_toeplitz</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>M2SCI function</center>
    <div align="right">Last update : 01/07/2004</div>
    <p>
      <b>mtlb_toeplitz</b> - Matlab toeplitz emulation function</p>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>Matlab and Scilab <tt>
        <b>toeplitz</b>
      </tt> behave differently in some particular cases:</p>
    <dl>
      <dd>
        <b></b>
        <dd>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        With one input parameter: if this parameter is complex or is a matrix, output value of
	Matlab and Scilab <tt>
              <b>toeplitz</b>
            </tt> can be different.
        </li>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        With two input parameters: if they are vectors and their first elements are not equal, 
	Scilab returns an error but Matlab gives priority to the column element. If they are matrices, output value of
	Matlab and Scilab <tt>
              <b>toeplitz</b>
            </tt> are different.
        </li>
        </dd>
      </dd>
    </dl>
    <p>
    The function <tt>
        <b>mtlb_toeplitz(c[,r])</b>
      </tt> is used by
    <tt>
        <b>mfile2sci</b>
      </tt> to replace <tt>
        <b>toeplitz(c[,r])</b>
      </tt> when it was not
    possible to know what were the operands/inputs[CUSTOM] while porting Matlab code to Scilab. This function will
    determine the correct semantic at run time. If you want to have a
    more efficient code it is possible to replace <tt>
        <b>mtlb_toeplitz</b>
      </tt> calls:
    </p>
    <dl>
      <dd>
        <b></b>
        <dd>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        When called with one input, if <tt>
              <b>c</b>
            </tt> is a real scalar or vector 
        <tt>
              <b>mtlb_toeplitz(c)</b>
            </tt> may be replaced by <tt>
              <b>toeplitz(c)</b>
            </tt>
          </li>
          <li>
            <b>
              <font color="maroon"></font>
            </b>
        When called with two inputs, if <tt>
              <b>c</b>
            </tt> and <tt>
              <b>r</b>
            </tt> are scalars or vectors and their first elements are equal
        <tt>
              <b>mtlb_toeplitz(c,r)</b>
            </tt> may be replaced by <tt>
              <b>toeplitz(c,r)</b>
            </tt>
          </li>
        </dd>
      </dd>
    </dl>
    <p>Caution: <tt>
        <b>mtlb_toeplitz</b>
      </tt> has not to be used for hand coded functions.</p>
    <h3>
      <font color="blue">Authors</font>
    </h3>
    <dl>
      <dd>
        <b></b>V.C.</dd>
    </dl>
  </body>
</html>
